
#ifndef __SDK_TASKBASE__INCLUDE__
#define __SDK_TASKBASE__INCLUDE__

#include "Task.h"

#include <iostream>

namespace nebula { namespace sdk {

class TaskBase : public ITask
{
public:
	TaskBase();
	TaskBase(const char* task_id);
	virtual ~TaskBase();

public:
	virtual NEBULA_ERROR_CODE Serialize  (std::ostream&) = 0;
	virtual NEBULA_ERROR_CODE UnSerialize(std::istream&) = 0;

public:
	virtual ITaskMeta*        GetTaskMeta();
	virtual NEBULA_ERROR_CODE SetTaskMeta(ITaskMeta*);

	virtual NEBULA_ERROR_CODE Serialize  (IOStream*);
	virtual NEBULA_ERROR_CODE UnSerialize(IIStream*);

	virtual NEBULA_ERROR_CODE AnteSerialize  ();
	virtual NEBULA_ERROR_CODE PostUnSerialize();

private:
	ITaskMeta* _metadata;
};

}}

#endif //end of __SDK_TASKBASE__INCLUDE__

